﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class HoaDonBUS
    {
        public static bool CapNhatHoaDon(HoaDonDTO hoadonDTO)
        {
            return HoaDonDAO.CapNhatHoaDon(hoadonDTO);
        }

        public static HoaDonDTO LayHoaDonCuoiCung()
        {            
            return HoaDonDAO.LayHoaDonCuoiCung();
        }

        public static HoaDonDTO LayHoaDonTheoID(int id)
        {
            return HoaDonDAO.LayHoaDonTheoID(id);
        }

        public static List<HoaDonDTO> LayDanhSachHoaDonTheoMaGianHang(int magianhang)
        {
            return HoaDonDAO.LayDanhSachHoaDonTheoMaGianHang(magianhang);
        }

        public static bool ThemHoaDon(HoaDonDTO hoadonDTO)
        {
            return HoaDonDAO.ThemHoaDon(hoadonDTO);
        }

        public static bool XoaHoaDonTheoID(int id)
        {
            return HoaDonDAO.XoaHoaDonTheoID(id);
        }

        public static bool XoaDanhSachHoaDonTheoMaGianHang(int magianhang)
        {
            return HoaDonBUS.XoaDanhSachHoaDonTheoMaGianHang(magianhang);
        }
    }
}
